export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  dialogEscape: false,
  dialogClickModal: false,
  searchMenuSpan: 6,
  column: [
    {
      type: "input",
      label: "小时",
      prop: "configTimeValue",
      rules: [
        {
          required: true,
          message: "请输入小时",
          trigger: "blur"
        },
        {
          validator: (rule, value, callback) => {
            // if (!/^(([1-9]{1}\d*)|([0]{1}))(\.(\d){0,1})?$/.test(value)) {
            if (!/^(([1-9]{1}\d*)|([0]{1}))?$/.test(value)) {
              callback(new Error("输入小时格式不对"));
            } else {
              callback();
            }
          },
          trigger: "blur"
        }
      ]
    },
    {
      type: "input",
      label: "金额值(元)",
      prop: "configAmoutValue",
      rules: [
        {
          required: true,
          message: "请输入金额值",
          trigger: "blur"
        },
        {
          validator: (rule, value, callback) => {
            if (!/^(([1-9]{1}\d*)|([0]{1}))?$/.test(value)) {
              callback(new Error("输入金额格式不对"));
            } else {
              callback();
            }
          },
          trigger: "blur"
        }
      ]
    }
  ]
};
